Conference Proceedings
Dashed Strings and the Replace(-all) Constraint
Roberto Amadini, Graeme Gange, Peter J Stuckey
26th International Conference, CP 2020, Louvain-la-Neuve, Belgium, September 7–11, 2020, Proceedings | Springer International Publishing | Published : 2020
Abstract
Dashed strings are a formalism for modelling the domain of string variables when solving combinatorial problems with string constraints. In this work we focus on (variants of) the Replace constraint, which aims to find the first occurrence of a query string in a target string, and (possibly) replaces it with a new string. We define a Replace propagator which can also handle Replace-Last (for replacing the last occurrence) and Replace-All (for replacing all the occurrences). Empirical results clearly show that string constraint solving can draw great benefit from this approach.
Grants
Awarded by Australian Research Council